l=['鲤鱼','草鱼','鲫鱼','鳙鱼','鲈鱼']
f=open(r"1.txt",'w+')
for i in l:
    f.write(i)
    f.write('\n')
f.seek(0)
print(f.read())
f.close

import xlrd
import xlwt
book1=xlwt.Workbook(encoding='utf-8')
sheet=book1.add_sheet('sheet1',cell_overwrite_ok=True)
dir={'f1':['鲤鱼','杂食性'],'f2':['草鱼','食草性'],'f3':['鲫鱼','温水性'],'f4':['鳙鱼','温水性'],'f5':['黑鱼','肉食性']}
row=0
count=0
for i in dir.keys():
    for j in dir[i]:
       sheet.write(row,0,j)
       row+=1
book1.save(r'1.xls')
wb=xlrd.open_workbook('1.xls')
sheet=wb.sheet_by_index(0)
for i in sheet:
    print(i)

    





